#include <iostream>
#include <string>
using namespace std;
class Date {
public:
    Date(int, int, int);
    Date(int, int);
    Date(int);
    Date();
    void display();
private:
    int year;
    int month;
    int day;
};

class Student {
public:
    Student(int, int);
    void show_msg();
    void static max(Student* stu);
private:
    int num;
    int score;
};

class Student1 {
public:
    Student1(int n, float s)
    {
        num = n;
        score = s;
    }
    void display() const
    {
        cout << "num = " << num << " score = " << score << endl;
    }
    void change(int n, float s) const
    {
        num = n;
        score = s;
    }
    void func(const Student1& stu) const;
private:
    mutable int num;
    mutable float score;
};

class Goods {
public:
    Goods(int num, float price);
    void comp_sum();
    static void show_average();
private:
    static int count; // 总共销售的件数
    static float sum;   // 总的销售额
    static float discount;  // 商店公布的每天的统一折扣
    int num;  // 销售员的销售个数
    float price;  // 每件商品的单价
};

class Time;
class Time1;
class Date1 {
public:
    Date1(int, int, int);
    friend void display(Date1&, Time&);
    friend class Time1;
private:
    int year;
    int month;
    int day;
};

class Time {
public:
    Time(int, int, int);
    friend void display(Date1&, Time&);
private:
    int hour;
    int minute;
    int second;
};

class Time1 {
public:
    Time1(int, int, int);
    void display(Date1& date)
    {
        cout << date.year << ":" << date.month << ":" << date.day << ":";
        cout << hour << ":" << minute << ":" << second << endl;
    }
private:
    int hour;
    int minute;
    int second;
};
template <class numtype>
class Compare{
public:
    Compare(numtype, numtype);
    numtype max();
    numtype min();
private:
    numtype num1;
    numtype num2;
};
